<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">
    <p:dialog id="dlgSunatMessage"
              header="#{messages.label_titulo_informacion}"
              modal="true" widgetVar="wvSunatMessage" resizable="true"
              dynamic="true" width="550">
        <p:outputPanel id="pnlSunatMessage">
            <h:panelGrid cellpadding="0" cellspacing="0" columns="2" width="100%">
                <h:panelGrid cellpadding="0" cellspacing="0" columns="1" width="94%">
                    <h:outputText id="sunatMessagesStr" value="#{fnEnvioJsfBean.sunatReponseMgr.msgSummary}"
                                  escape="false"/>
                </h:panelGrid>
                <h:panelGrid cellpadding="0" cellspacing="0" columns="1" width="6%">
                    <p:graphicImage value="../../resources/images/info.png" width="20px"
                                    height="20px"/>
                </h:panelGrid>
            </h:panelGrid>
            <h:panelGrid columns="1" styleClass="centered">
                <h:form>
                    <p:panel id="pnlWarning" toggleable="false"
                             styleClass="gridContent" visible="#{fnEnvioJsfBean.sunatReponseMgr.existWarning}">
                        <f:facet name="header">
                            <h:outputText value="Listado de Warnings"/>
                        </f:facet>
                        <h:outputText value=" (Registros : #{fnEnvioJsfBean.sunatReponseMgr.warningListSize}) "
                                      styleClass="resultHeader"/>
                        <p:dataTable id="dttWarning" value="#{fnEnvioJsfBean.sunatReponseMgr.warningList}"
                                     var="item"
                                     style="width:100%"
                                     paginator="#{fnEnvioJsfBean.sunatReponseMgr.showWarningPaginator}"
                                     rows="#{fnEnvioJsfBean.sunatReponseMgr.rowsPerPage}"
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                     rowsPerPageTemplate="5,10,15">
                            <p:column styleClass="columnLeftTopClass"
                                      style="min-width:100px; max-width:500px">
                                <f:facet name="header">
                                    <h:outputText value="Warning"/>
                                </f:facet>
                                <h:outputText value="#{item}"/>
                            </p:column>
                        </p:dataTable>
                    </p:panel>
                    <p:panel id="pnlErrores" toggleable="false"
                             styleClass="gridContent" visible="#{fnEnvioJsfBean.sunatReponseMgr.existError}">
                        <f:facet name="header">
                            <h:outputText value="Listado de Errores"/>
                        </f:facet>
                        <h:outputText value=" (Registros : #{fnEnvioJsfBean.sunatReponseMgr.errorListSize}) "
                                      styleClass="resultHeader"/>
                        <p:dataTable id="dttError" value="#{fnEnvioJsfBean.sunatReponseMgr.errorList}"
                                     var="item"
                                     style="width:100%"
                                     paginator="#{fnEnvioJsfBean.sunatReponseMgr.showErrorPaginator}"
                                     rows="#{fnEnvioJsfBean.sunatReponseMgr.rowsPerPage}"
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                     rowsPerPageTemplate="5,10,15">
                            <p:column styleClass="columnLeftTopClass"
                                      style="min-width:100px; max-width:500px">
                                <f:facet name="header">
                                    <h:outputText value="Error"/>
                                </f:facet>
                                <h:outputText value="#{item}"/>
                            </p:column>
                        </p:dataTable>
                    </p:panel>
                </h:form>
            </h:panelGrid>
            <h:panelGrid columns="1" styleClass="centered">
                <p:commandButton value="#{messages.label_aceptar}"
                                 onclick="wvSunatMessage.hide()"/>
            </h:panelGrid>
        </p:outputPanel>
    </p:dialog>

</ui:composition>
